package sensor;

import java.awt.Image;

import utils.ImageDeted;
import utils.MatToImage;
import analysis.BlinkDet;
import analysis.EyeDet;
import analysis.FaceDet;
import analysis.IDetection;
import analysis.VideoCap;

public class TELESensor{

	public ImageDeted id;

	IDetection vc;

	public TELESensor() {

//		id = new ImageDeted();
		IDetection bd = new BlinkDet(), ed = new EyeDet(), fd = new FaceDet();
		vc = new VideoCap(3);
		bd.run(ed.run(fd.run(vc.run(id = new ImageDeted()))));

	}

	public double getValue() {
		return id.closed;
	}

	public Image getData() {
		return new MatToImage().toBufferedImage(id.getImage());
	}
}
